\(\int \frac {1}{(a g+b g x)^2 (A+B \log (e (\frac {a+b x}{c+d x})^n))^2} \, dx\) [27]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [F]
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 35, antiderivative size = 153 \[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x) \operatorname {ExpIntegralEi}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d) g^2 n^2 (a+b x)}-\frac {c+d x}{B (b c-a d) g^2 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]

[Out]

-exp(A/B/n)*(e*((b*x+a)/(d*x+c))^n)^(1/n)*(d*x+c)*Ei((-A-B*ln(e*((b*x+a)/(d*x+c))^n))/B/n)/B^2/(-a*d+b*c)/g^2/
n^2/(b*x+a)+(-d*x-c)/B/(-a*d+b*c)/g^2/n/(b*x+a)/(A+B*ln(e*((b*x+a)/(d*x+c))^n))

Rubi [A] (verified)

Time = 0.10 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2549, 2343, 2347, 2209} \[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {e^{\frac {A}{B n}} (c+d x) \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 g^2 n^2 (a+b x) (b c-a d)}-\frac {c+d x}{B g^2 n (a+b x) (b c-a d) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )} \]

[In]

Int[1/((a*g + b*g*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2),x]

[Out]

-((E^(A/(B*n))*(e*((a + b*x)/(c + d*x))^n)^n^(-1)*(c + d*x)*ExpIntegralEi[-((A + B*Log[e*((a + b*x)/(c + d*x))
^n])/(B*n))])/(B^2*(b*c - a*d)*g^2*n^2*(a + b*x))) - (c + d*x)/(B*(b*c - a*d)*g^2*n*(a + b*x)*(A + B*Log[e*((a
 + b*x)/(c + d*x))^n]))

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

Rule 2343

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log
[c*x^n])^(p + 1)/(b*d*n*(p + 1))), x] - Dist[(m + 1)/(b*n*(p + 1)), Int[(d*x)^m*(a + b*Log[c*x^n])^(p + 1), x]
, x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1] && LtQ[p, -1]

Rule 2347

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_)*((d_.)*(x_))^(m_.), x_Symbol] :> Dist[(d*x)^(m + 1)/(d*n*(c*x^n
)^((m + 1)/n)), Subst[Int[E^(((m + 1)/n)*x)*(a + b*x)^p, x], x, Log[c*x^n]], x] /; FreeQ[{a, b, c, d, m, n, p}
, x]

Rule 2549

Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*(B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m
_.), x_Symbol] :> Dist[(b*c - a*d)^(m + 1)*(g/b)^m, Subst[Int[x^m*((A + B*Log[e*x^n])^p/(b - d*x)^(m + 2)), x]
, x, (a + b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c - a*d, 0] && IntegersQ[m,
 p] && EqQ[b*f - a*g, 0] && (GtQ[p, 0] || LtQ[m, -1])

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{x^2 \left (A+B \log \left (e x^n\right )\right )^2} \, dx,x,\frac {a+b x}{c+d x}\right )}{(b c-a d) g^2} \\ & = -\frac {c+d x}{B (b c-a d) g^2 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {\text {Subst}\left (\int \frac {1}{x^2 \left (A+B \log \left (e x^n\right )\right )} \, dx,x,\frac {a+b x}{c+d x}\right )}{B (b c-a d) g^2 n} \\ & = -\frac {c+d x}{B (b c-a d) g^2 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}-\frac {\left (\left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x)\right ) \text {Subst}\left (\int \frac {e^{-\frac {x}{n}}}{A+B x} \, dx,x,\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{B (b c-a d) g^2 n^2 (a+b x)} \\ & = -\frac {e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} (c+d x) \text {Ei}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right )}{B^2 (b c-a d) g^2 n^2 (a+b x)}-\frac {c+d x}{B (b c-a d) g^2 n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.16 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.95 \[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {(c+d x) \left (B n+e^{\frac {A}{B n}} \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )^{\frac {1}{n}} \operatorname {ExpIntegralEi}\left (-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{B n}\right ) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )\right )}{B^2 (b c-a d) g^2 n^2 (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )} \]

[In]

Integrate[1/((a*g + b*g*x)^2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2),x]

[Out]

-(((c + d*x)*(B*n + E^(A/(B*n))*(e*((a + b*x)/(c + d*x))^n)^n^(-1)*ExpIntegralEi[-((A + B*Log[e*((a + b*x)/(c
+ d*x))^n])/(B*n))]*(A + B*Log[e*((a + b*x)/(c + d*x))^n])))/(B^2*(b*c - a*d)*g^2*n^2*(a + b*x)*(A + B*Log[e*(
(a + b*x)/(c + d*x))^n])))

Maple [F]

\[\int \frac {1}{\left (b g x +a g \right )^{2} {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}d x\]

[In]

int(1/(b*g*x+a*g)^2/(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

[Out]

int(1/(b*g*x+a*g)^2/(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2,x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.79 \[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=-\frac {B d n x + B c n + {\left (A b x + A a + {\left (B b x + B a\right )} \log \left (e\right ) + {\left (B b n x + B a n\right )} \log \left (\frac {b x + a}{d x + c}\right )\right )} e^{\left (\frac {B \log \left (e\right ) + A}{B n}\right )} \operatorname {log\_integral}\left (\frac {{\left (d x + c\right )} e^{\left (-\frac {B \log \left (e\right ) + A}{B n}\right )}}{b x + a}\right )}{{\left (A B^{2} b^{2} c - A B^{2} a b d\right )} g^{2} n^{2} x + {\left (A B^{2} a b c - A B^{2} a^{2} d\right )} g^{2} n^{2} + {\left ({\left (B^{3} b^{2} c - B^{3} a b d\right )} g^{2} n^{2} x + {\left (B^{3} a b c - B^{3} a^{2} d\right )} g^{2} n^{2}\right )} \log \left (e\right ) + {\left ({\left (B^{3} b^{2} c - B^{3} a b d\right )} g^{2} n^{3} x + {\left (B^{3} a b c - B^{3} a^{2} d\right )} g^{2} n^{3}\right )} \log \left (\frac {b x + a}{d x + c}\right )} \]

[In]

integrate(1/(b*g*x+a*g)^2/(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="fricas")

[Out]

-(B*d*n*x + B*c*n + (A*b*x + A*a + (B*b*x + B*a)*log(e) + (B*b*n*x + B*a*n)*log((b*x + a)/(d*x + c)))*e^((B*lo
g(e) + A)/(B*n))*log_integral((d*x + c)*e^(-(B*log(e) + A)/(B*n))/(b*x + a)))/((A*B^2*b^2*c - A*B^2*a*b*d)*g^2
*n^2*x + (A*B^2*a*b*c - A*B^2*a^2*d)*g^2*n^2 + ((B^3*b^2*c - B^3*a*b*d)*g^2*n^2*x + (B^3*a*b*c - B^3*a^2*d)*g^
2*n^2)*log(e) + ((B^3*b^2*c - B^3*a*b*d)*g^2*n^3*x + (B^3*a*b*c - B^3*a^2*d)*g^2*n^3)*log((b*x + a)/(d*x + c))
)

Sympy [F(-1)]

Timed out. \[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\text {Timed out} \]

[In]

integrate(1/(b*g*x+a*g)**2/(A+B*ln(e*((b*x+a)/(d*x+c))**n))**2,x)

[Out]

Timed out

Maxima [F]

\[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int { \frac {1}{{\left (b g x + a g\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}} \,d x } \]

[In]

integrate(1/(b*g*x+a*g)^2/(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="maxima")

[Out]

-(d*x + c)/((a*b*c*g^2*n - a^2*d*g^2*n)*A*B + (a*b*c*g^2*n*log(e) - a^2*d*g^2*n*log(e))*B^2 + ((b^2*c*g^2*n -
a*b*d*g^2*n)*A*B + (b^2*c*g^2*n*log(e) - a*b*d*g^2*n*log(e))*B^2)*x + ((b^2*c*g^2*n - a*b*d*g^2*n)*B^2*x + (a*
b*c*g^2*n - a^2*d*g^2*n)*B^2)*log((b*x + a)^n) - ((b^2*c*g^2*n - a*b*d*g^2*n)*B^2*x + (a*b*c*g^2*n - a^2*d*g^2
*n)*B^2)*log((d*x + c)^n)) + integrate(-1/(B^2*a^2*g^2*n*log(e) + A*B*a^2*g^2*n + (B^2*b^2*g^2*n*log(e) + A*B*
b^2*g^2*n)*x^2 + 2*(B^2*a*b*g^2*n*log(e) + A*B*a*b*g^2*n)*x + (B^2*b^2*g^2*n*x^2 + 2*B^2*a*b*g^2*n*x + B^2*a^2
*g^2*n)*log((b*x + a)^n) - (B^2*b^2*g^2*n*x^2 + 2*B^2*a*b*g^2*n*x + B^2*a^2*g^2*n)*log((d*x + c)^n)), x)

Giac [F]

\[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int { \frac {1}{{\left (b g x + a g\right )}^{2} {\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}} \,d x } \]

[In]

integrate(1/(b*g*x+a*g)^2/(A+B*log(e*((b*x+a)/(d*x+c))^n))^2,x, algorithm="giac")

[Out]

integrate(1/((b*g*x + a*g)^2*(B*log(e*((b*x + a)/(d*x + c))^n) + A)^2), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {1}{(a g+b g x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2} \, dx=\int \frac {1}{{\left (a\,g+b\,g\,x\right )}^2\,{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2} \,d x \]

[In]

int(1/((a*g + b*g*x)^2*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2),x)

[Out]

int(1/((a*g + b*g*x)^2*(A + B*log(e*((a + b*x)/(c + d*x))^n))^2), x)